package stigtest.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import stigtest.service.UserInfoService;
import stigtest.shop.entity.UserInfo;

@Controller
@RequestMapping("/user")
public class UserController {
	@Autowired
	private UserInfoService userInfoService;
	
	@RequestMapping(value="/{id}")
	public String getUserById(@PathVariable(value="id") Integer id,ModelMap model)
	{
		UserInfo user = userInfoService.getById(id);
		
		System.out.println(user.getId());
		return "user";
	}

}
